package me.yobol.datastructure.basic.list.linked.dll;
import me.yobol.datastructure.basic.list.Node;

/**
 *
 * @author Yobol
 */
public class DoubleLinkedNode extends Node{
    private int key;
    private DoubleLinkedNode next;
    private DoubleLinkedNode prior;
    
    public DoubleLinkedNode(){
        this(0,null,null);
    }
    
    public DoubleLinkedNode(int key){
        this(key,null,null);
    }
    
    public DoubleLinkedNode(int key,DoubleLinkedNode prior,DoubleLinkedNode next){
        this.key = key;
        this.prior = prior;
        this.next = next;
    }

    @Override
    public int getKey() {
        return key;
    }

    @Override
    public void setKey(int key) {
        this.key = key;
    }

    public DoubleLinkedNode getPrior() {
        return prior;
    }

    public void setPrior(DoubleLinkedNode prior) {
        this.prior = prior;
    }

    public DoubleLinkedNode getNext() {
        return next;
    }

    public void setNext(DoubleLinkedNode next) {
        this.next = next;
    }
    
}
